import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("../views/Login")
  },
  {
    path: "/",
    name: "mian",
    component: () => import("../views/Main"),
    children: [
      {
        path: "/",
        name: "home",
        component: () => import("../views/Home/Home")
      },
      {
        path: "/UserManagement",
        name: "UserManagement",
        component: () => import("../views/UserManagement/UserManagement")
      },
      {
        path: "/baseScheduleImport",
        name: "baseScheduleImport",
        component: () => import("../views/Plan/BaseScheduleImp")
      },
      {
        path: "/schedule",
        name: "schedule",
        component: () => import("../views/Plan/Schedule")
      },
      {
        path: "/scheduleQX",
        name: "schedulescheduleQX",
        component: () => import("../views/Plan/ScheduleQX")
      },
      {
        path: "/planeInfo",
        name: "planeInfo",
        component: () => import("../views/plane/PlaneInfo")
      },
      {
        path: "/planeAge",
        name: "planeAge",
        component: () => import("../views/plane/PlaneAge")
      },
      {
        path: "/regPlane",
        name: "planeAge",
        component: () => import("../views/plane/RegPlane")
      },
      {
        path: "/history",
        name: "history",
        component: () => import("../views/DataQuery/History")
      },
      {
        path: "/distance",
        name: "distance",
        component: () => import("../views/DataQuery/Distance")
      },
      {
        path: "/kbquery",
        name: "kbquery",
        component: () => import("../views/DataQuery/KbQuery")
      }
    ]
  }
];
const router = new VueRouter({
  routes
});

export default router;
